1. Technical Field
This disclosure relates generally to data structures used with programming language objects in a data processing system and more specifically to creating a packed data object defined in a program in the data processing system.
2. Description of the Related Art
Some programming languages provide nested structured value types, for example structs in C programming language and records in COBOL. Java types, however, are limited to primitives and object references. When an instance of an object is created using Java, memory is allocated for the object to contain all of the primitive fields plus all of the reference fields associated with the object. Primitive fields are allocated inline with the object. However, object reference fields are allocated as a reference to another allocated instance object. A prior attempt to overcome the limitation was only capable of use on objects that wrapped native data. The previous attempt was not capable of working on actual Java heap objects and thus presented a further limitation. Such objects were not entitled for the garbage collection process provided for use in the programming language. Accordingly for each object reference field, extra heap memory was needed for the reference as well as for the new object header, leading to increased heap fragmentation.